#include<iostream>
#include<string>
using namespace std;
class Person
{
public:
	Person(string name,int age)
	{
		m_Name = name;
		m_Age = age;
	}
	string m_Name;
	int m_Age;
};

template<class T>
bool Mycompare(T a, T b)
{
	if (a == b)
	{
		return true;
	}
	else
	{
		return false;
	}
}
template<>bool Mycompare(Person a, Person b)
{
	if (a.m_Age == b.m_Age && a.m_Name == b.m_Name)
	{
		return true;
	}
	else
	{
		return false;
	}
}
void test01()
{
	Person p1("Tom", 18);
	Person p2("Tom", 18);
	if (Mycompare(p1, p2))
	{
		cout << "p1==p2" << endl;
	}
	else
	{
		cout << "p1!=p2" << endl;
	}
}
int main()
{
	test01();
	system("pause");
	
	return 0;
}